package org.vacoor.xqq.core.bean;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.swing.*;

/**
 * 联系人
 * <p/>
 * User: vacoor
 */
public class Contact {
    private static final Logger logger = LoggerFactory.getLogger(Contact.class);

    private long id;   // UIN
    private String account;     // 帐号(QQ/Email)
    private ImageIcon avatar;   // 头像
    private String nick;    // 昵称
    private String mark; // 显示名称/备注名称
    private String additional;// 个性签名
    private Status status = Status.OFFLINE;
    private Category category;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public ImageIcon getAvatar() {
        return avatar;
    }

    public void setAvatar(ImageIcon avatar) {
        this.avatar = avatar;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public String getMark() {
        return mark;
    }

    public void setMark(String mark) {
        this.mark = mark;
    }

    public String getAdditional() {
        return additional;
    }

    public void setAdditional(String additional) {
        this.additional = additional;
        logger.debug("Contact Update: {}", this);
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Contact{" +
                "id=" + id +
                ", account='" + account + '\'' +
                ", avatar=" + avatar +
                ", nick='" + nick + '\'' +
                ", mark='" + mark + '\'' +
                ", additional='" + additional + '\'' +
                ", status=" + status +
                '}';
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    public Category getCategory() {
        return category;
    }
}
